gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now

您所在的位置:网站首页 stdin not in gzip format data gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now

gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now

2023-04-05 16:58| 来源: 网络整理| 查看: 265

This means the file isn't really a gzipped tar file -- or any kind of gzipped file -- in spite of being named like one.

When you download a file with wget, check for indications like Length: unspecified [text/html] which shows it is plain text (text) and that it is intended to be interpreted as html. Check the wget output below -

[[email protected] opt]# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz" --2017-10-12 12:39:40-- http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz Resolving download.oracle.com (download.oracle.com)... 23.72.136.27, 23.72.136.67 Connecting to download.oracle.com (download.oracle.com)|23.72.136.27|:80... connected. HTTP request sent, awaiting response... 302 Not Allowed Location: http://XXXX/FAQs/URLFiltering/ProxyWarning.html [following] --2017-10-12 12:39:40-- http://XXXX/FAQs/URLFiltering/ProxyWarning.html Resolving XXXX (XXXXX)... XXX.XX.XX.XXX Connecting to XXXX (XXXX)|XXX.XX.XX.XXX|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 17121 (17K) [text/html] Saving to: ‘jdk-8u144-linux-x64.tar.gz’ 100%[=========================================================================================================================================================================>] 17,121 --.-K/s in 0.05s 2017-10-12 12:39:40 (349 KB/s) - ‘jdk-8u144-linux-x64.tar.gz’ saved [17121/17121]

This sort of confirms that you haven't received a gzip file.

For a correct file, the wget output will show something like Length: 185515842 (177M) [application/x-gzip] as shown in the below output -

[[email protected] opt]# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz" --2017-10-12 12:50:06-- http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz Resolving download.oracle.com (download.oracle.com)... XX.XXX.XX.XX, XX.XX.XXX.XX Connecting to download.oracle.com (download.oracle.com)|XX.XX.XXX.XX|:80... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz [following] --2017-10-12 12:50:06-- https://edelivery.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz Resolving edelivery.oracle.com (edelivery.oracle.com)... XXX.XX.XXX.XX, 2600:1404:16:188::2d3e, 2600:1404:16:180::2d3e Connecting to edelivery.oracle.com (edelivery.oracle.com)|XXX.XX.XX.XXX|:443... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz?AuthParam=1507827127_f44251ebbb44c6e61e7f202677f94afd [following] --2017-10-12 12:50:07-- http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz?AuthParam=1507827127_f44251ebbb44c6e61 Connecting to download.oracle.com (download.oracle.com)|XX.XX.XXX.XX|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 185515842 (177M) [application/x-gzip] Saving to: ‘jdk-8u144-linux-x64.tar.gz’ 100%[=========================================================================================================================================================================>] 185,515,842 6.60MB/s in 28s 2017-10-12 12:50:34 (6.43 MB/s) - ‘jdk-8u144-linux-x64.tar.gz’ saved [185515842/185515842]

The above shows a correct gzip application file has been downloaded.

You can also file, head, less, view utilities to check the file. For example a HTML file would give below output -

[[email protected] opt]# head jdk-8u144-linux-x64.tar.gz

The above shows it is indeed an HTML page which we are trying to unzip/untar - something that won't work. If it was indeed a correct zip file (binary in nature) the output of head would have produced garbage - something like below -

[[email protected] opt]# head jdk-8u144-linux-x64.tar.gz x�rY�[ms�F������ڍtіl���DR���Ŋ��j $�$,`0�h�_����/��=�@Q�w+��ձ*�Hbfz�{�~�{�i�x��k����޾}����z���w����g�����{�޼�;{s����w���⹳�7�N����i� �����} �¿g��������ק���7��s�����폺î߹�����~i��j�/�����޿#���=��=>��߿{}��|�������������3���X���]9�ޠ����u�����%ğ�


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3